package ToolTip
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextFormat;
	
	import util.ToolTip;
	
	public class TestToolTip extends Sprite
	{
		private var sprit:Sprite;
		public function TestToolTip()
		{
			super();
			
			sprit = new Sprite();
			sprit.graphics.beginFill(0,.5);
			sprit.graphics.drawRoundRect(0,0,30,10,10,10);
			sprit.graphics.endFill();
			
			sprit.x = 100;
			sprit.y = 100;
			
			this.addChild(sprit);
			
			sprit.addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);
			
		}
		
		public function onMouseOver(event:MouseEvent):void
		{
//			var tf:TextFormat = new TextFormat();
//			tf.bold = true;
//			tf.size = 12;
//			tf.color = 0xff0000;
			var tt:ToolTip = new ToolTip();
			tt.hook = true;
			tt.cornerRadius = 20;
			tt.autoSize = true;
			tt.align = "right";
//			tt.show( level1.level2, "Simple ToolTip", "Hook Enabled, Corner Radius 20, AutoSize Width, Align Right, Basic Format" );
			tt.show( sprit, "Title Of This ToolTip", "Some Copy that would go below the ToolTip Title" );
		}
	}
}